package com.binvshe.binvshe.organization;

import android.content.Context;
import android.content.Intent;
import android.graphics.Color;
import android.os.Build;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.binvshe.binvshe.R;
import com.binvshe.binvshe.account.utils.FragmentUtils;
import com.f2prateek.dart.Dart;
import com.f2prateek.dart.InjectExtra;
import com.pachong.android.baseuicomponent.activity.BaseActivity;

/**
 * Created by Zoi.
 * E-mail：KyluZoi@gmail.com
 * 2016/9/21
 */

public class ClubCenterActivity extends BaseActivity {
    private static final String KEY_CLUBID = "CLUBID";


    @InjectExtra(KEY_CLUBID)
    int mClubID = -1;

    public static void start(Context context, int clubID) {
        Intent starter = new Intent(context, ClubCenterActivity.class);
        starter.putExtra(KEY_CLUBID, clubID);
        context.startActivity(starter);
    }

    @Override
    public View createDataView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        return inflater.inflate(R.layout.act_my_club, container, false);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Dart.inject(this);
        initView();
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
            getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN|View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
            getWindow().setStatusBarColor(Color.TRANSPARENT);
        }
        hideToolbar();
    }

    private void initView() {
        FragmentUtils.replaceFragment(getSupportFragmentManager(), R.id.relytClubOpus,
                OpusFragment.newInstance(mClubID));
    }
}
